package com.lottery.material.entity.circle;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lottery.material.entity.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Description：圈子成员表
 * Created by 朱正磊 on 2019-04-09 10:20
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "material_circle_member_info")
public class CircleMemberInfo extends BaseEntity {

    private static final long serialVersionUID = -2812057479281620303L;

    @Column(columnDefinition = "varchar(50) not null comment '用户id'")
    private String userId;

    @Column(columnDefinition = "int(11) not null comment '圈子id'")
    private Integer circleId;

    @Column(columnDefinition = "int(1) default '1' comment '圈内等级（1：普通圈员/预备圈员；2：正式圈员/认证圈员；3：副圈主；4：圈主）'")
    private Integer rank;

    @Column(columnDefinition = "int(1) default '1' comment '是否禁言（1：否；2：是）'")
    private Integer isBan;

    @Column(columnDefinition = "int(1) default '1' comment '是否置顶（1：否；2：是）'")
    private Integer isTop;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '置顶时间'")
    private Date topTime;

}
